package com.easy.system.util;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-6-18
 * Time: 下午1:29
 * To change this template use File | Settings | File Templates.
 */
public class Condition {


    private String className;
    private String alias;
    private List<Condition> children = new ArrayList<Condition>();


    private String relation;
    private String property;
    private String operate;


    private Object value; //待扩展

    public Condition(String className) {
        this.className = className;
    }

    public Condition(String className, String alias, List<Condition> children) {
        this.className = className;
        this.alias = alias;
        this.children = children;
    }

    public Condition(String relation, String property, String operate, Object value) {
        this.relation = relation;
        this.property = property;
        this.operate = operate;
        this.value = value;
    }

    public Condition(String property, String operate, Object value) {
        this.relation = " and ";
        this.property = property;
        this.operate = operate;
        this.value = value;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }


    public List<Condition> getChildren() {
        return children;
    }

    public void setChildren(List<Condition> children) {
        this.children = children;
    }

    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public String getOperate() {
        return operate;
    }

    public void setOperate(String operate) {
        this.operate = operate;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

}
